import ReactDOM from "react-dom/client";
// 引入 react-redux 提供的 Provider 组件
import { Provider } from "react-redux";
// 引入 store
import store from "./store";
import App from "./App";

// 重写 store.dispatch : redux 中间件核心原理
// const next = store.dispatch;
// store.dispatch = (action) => {
//   console.log("阿巴阿巴");
//   next(action);
// };

const root = ReactDOM.createRoot(document.querySelector("#root")!);
root.render(
  <Provider store={store}>
    <App />
  </Provider>
);
